home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 2002 November / SGI IRIX 6.5 Applications 2002 November.iso / dist / cosmocreate.idb / usr / lib / CosmoCreate / apps / startshowcase.z / startshowcase
Encoding:
Text File  |  1998-05-07  |  1.3 KB  |  57 lines

  1. #!/bin/sh
  2.  
  3. # debugging output
  4. # set -x
  5.  
  6. # global variables used in the script
  7. progname="startshowcase"
  8. usage="Usage: $progname <showcase arguments>"
  9.  
  10. showcase=/usr/sbin/showcase
  11. psrip=/usr/lib/print/psrip
  12. psprolog=/usr/lib/print/data/PSRIPprolog
  13. gs1=/usr/bin/X11/gs
  14. gs2=/usr/freeware/bin/gs
  15.  
  16. starterr="xconfirm -header Showcase -t Error:"
  17. enderr="-icon error -B Ok"
  18.  
  19. # make sure showcase exists
  20. if [ ! -x $showcase ]; then
  21.   $starterr -t "Showcase not found." \
  22.   $enderr
  23.   exit 1
  24. fi
  25.  
  26. # make sure gs or psrip exists
  27. if [ -x $psrip -a -r $psprolog ]; then
  28.   answer=Yes
  29. else 
  30.   if [ -x $gs1 ]; then
  31.     answer=Yes
  32.   elif [ -x $gs2 ]; then
  33.     answer=Yes
  34.   else
  35.     answer=`xconfirm -header Showcase -t Warning: \
  36.               -t "  " \
  37.               -t "Neither Ghostscript nor Impressario psrip was" \
  38.               -t "found. One of these must be installed to allow" \
  39.               -t "the conversion of Showcase files to GIF files." \
  40.               -t "  " \
  41.               -t "You can still use Showcase, but the Showcase" \
  42.               -t "documents will not be incorporated into your" \
  43.               -t "HTML document." \
  44.               -t "  " \
  45.               -t "Would you like to start Showcase anyway?" \
  46.               -icon warning -b "Yes" -B "No"`
  47.   fi
  48. fi 
  49.  
  50. if [ $answer = Yes ]; then
  51.   # convert from showcase to postscript
  52.   showcase $@
  53. fi
  54.   
  55. exit $status
  56.  
  57.